package com.hecore.lagou.mr.partition;

import com.hecore.lagou.mr.entity.PartitionBean;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

/**
 * @Author: hecore
 * @Date: 2020/10/18 21:30
 * @Description:
 */

public class PartitionReducer extends Reducer<Text, PartitionBean,Text, PartitionBean> {

    // 判断是否需要运算还是直接输出
    @Override
    protected void reduce(Text key, Iterable<PartitionBean> values, Context context) throws IOException, InterruptedException {
        for (PartitionBean bean:values){
            context.write(key,bean);
        };

    }


}
